//
//  anquanshezhiViewController.m
//  个人信息
//
//  Created by IOSchengxuyuan on 15/12/1.
//  Copyright © 2015年 com.ppfur. All rights reserved.
//

#import "anquanshezhiViewController.h"
#import "bangdingshoujiViewController.h"
#import "youxiangbangdingViewController.h"
#import "mimaxiugaiViewController.h"
#import "gerenshenfenrenzhengViewController.h"
@interface anquanshezhiViewController (){
    float aa,bb;
    float width,height;
    UITableViewCell*cell;
}

@end

@implementation anquanshezhiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _mytable.delegate=self;
    _mytable.dataSource=self;
    width=[UIScreen mainScreen].bounds.size.width;
    height=[UIScreen mainScreen].bounds.size.height;
    aa=width/320;
    bb=height/568;
    _mytable.frame=CGRectMake(0, 0, width, height);
    _mytable.scrollEnabled=NO;
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 6;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 50;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    if(width==375){
        if (section!=5) {
            return 5;
        }else{
            return 275;
        }
    }else if(width==320){
        if (section!=5) {
            return 5;
        }else{
            return 180;
        }
    }else {
        if (section!=5) {
            return 5;
        }else{
            return 350;
        }
        
    }
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
    if (indexPath.section==2) {
        bangdingshoujiViewController*xiaoxi=[[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"bangdingshouji"];
        [self.navigationController pushViewController:xiaoxi animated:YES];
    }else if (indexPath.section==3){
        youxiangbangdingViewController*xiaoxi=[[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"youxiangbangding"];
        [self.navigationController pushViewController:xiaoxi animated:YES];
    }else if (indexPath.section==4){
        mimaxiugaiViewController*xiaoxi=[[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"mimaxiugai"];
        [self.navigationController pushViewController:xiaoxi animated:YES];
    }else if(indexPath.section==5){
        gerenshenfenrenzhengViewController*xiaoxi=[[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"gerenshenfenrenzheng"];
        [self.navigationController pushViewController:xiaoxi animated:YES];
    }
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *id=@"row";
    cell=[tableView dequeueReusableCellWithIdentifier:id];
    if (cell==nil)
    {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id];
    }
    NSArray *row1=[cell.contentView subviews];
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    for (UIView *vv2 in row1)
    {
        [vv2 removeFromSuperview];
    }
    
    if (indexPath.section==0) {
        if (indexPath.row==0) {
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(20, 10, 50, 30)];
            ll1.font=[UIFont systemFontOfSize:14.0f];
            ll1.text=@"登录名";
            [cell.contentView addSubview:ll1];
            
        }
    }else if(indexPath.section==1){
        
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(20, 10, 100, 30)];
        ll1.font=[UIFont systemFontOfSize:14.0f];
        ll1.text=@"密码强度";
        [cell.contentView addSubview:ll1];
        
    }else if(indexPath.section==2){
        
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(20, 10, 100, 30)];
        ll1.font=[UIFont systemFontOfSize:14.0f];
        ll1.text=@"绑定手机";
        [cell.contentView addSubview:ll1];
    }else if(indexPath.section==3){
        
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(20, 10, 100, 30)];
        ll1.font=[UIFont systemFontOfSize:14.0f];
        ll1.text=@"邮箱绑定";
        [cell.contentView addSubview:ll1];
    }else if(indexPath.section==4){
                UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(20, 10, 100, 30)];
        ll1.font=[UIFont systemFontOfSize:14.0f];
        ll1.text=@"密码修改";
        [cell.contentView addSubview:ll1];
    }else {
                UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(20, 10, 100, 30)];
        ll1.font=[UIFont systemFontOfSize:14.0f];
        ll1.text=@"个人身份认证";
        [cell.contentView addSubview:ll1];
    }
    if(width==375){
    if (indexPath.section==0) {
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(200, 10, 140, 30)];
        ll1.font=[UIFont systemFontOfSize:13.0f];
        ll1.text=@"yangjianbo12345678";
        ll1.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll1];
    }else if(indexPath.section==1){
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(130, 10, 220, 30)];
        ll1.font=[UIFont systemFontOfSize:13.0f];
        ll1.text=@"低 中 高 根据匹配程度判断密码强度";
        ll1.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll1];
    }else if(indexPath.section==2){
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(240, 10, 120, 30)];
        ll1.font=[UIFont systemFontOfSize:13.0f];
        ll1.text=@"123****4568";
        ll1.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll1];
    }else if(indexPath.section==3){
        UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(210, 10, 140, 30)];
        ll1.font=[UIFont systemFontOfSize:13.0f];
        ll1.text=@"2465742@qq.com";
        ll1.textColor=[UIColor lightGrayColor];
        [cell.contentView addSubview:ll1];
    }
    }else if(width==320){
        if (indexPath.section==0) {
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(170, 10, 140, 30)];
            ll1.font=[UIFont systemFontOfSize:12.0f];
            ll1.text=@"yangjianbo12345678";
            ll1.textColor=[UIColor lightGrayColor];
            [cell.contentView addSubview:ll1];
        }else if(indexPath.section==1){
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(100, 10, 220, 30)];
            ll1.font=[UIFont systemFontOfSize:12.0f];
            ll1.text=@"低 中 高 根据匹配程度判断密码强度";
            ll1.textColor=[UIColor lightGrayColor];
            [cell.contentView addSubview:ll1];
        }else if(indexPath.section==2){
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(200, 10, 120, 30)];
            ll1.font=[UIFont systemFontOfSize:12.0f];
            ll1.text=@"123****4568";
            ll1.textColor=[UIColor lightGrayColor];
            [cell.contentView addSubview:ll1];
        }else if(indexPath.section==3){
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(170, 10, 140, 30)];
            ll1.font=[UIFont systemFontOfSize:12.0f];
            ll1.text=@"2465742@qq.com";
            ll1.textColor=[UIColor lightGrayColor];
            [cell.contentView addSubview:ll1];
        }
    }else{
        if (indexPath.section==0) {
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(240, 10, 140, 30)];
            ll1.font=[UIFont systemFontOfSize:13.0f];
            ll1.text=@"yangjianbo12345678";
            ll1.textColor=[UIColor lightGrayColor];
            [cell.contentView addSubview:ll1];
        }else if(indexPath.section==1){
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(170, 10, 220, 30)];
            ll1.font=[UIFont systemFontOfSize:13.0f];
            ll1.text=@"低 中 高 根据匹配程度判断密码强度";
            ll1.textColor=[UIColor lightGrayColor];
            [cell.contentView addSubview:ll1];
        }else if(indexPath.section==2){
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(280, 10, 120, 30)];
            ll1.font=[UIFont systemFontOfSize:13.0f];
            ll1.text=@"123****4568";
            ll1.textColor=[UIColor lightGrayColor];
            [cell.contentView addSubview:ll1];
        }else if(indexPath.section==3){
            UILabel*ll1=[[UILabel alloc]initWithFrame:CGRectMake(250, 10, 140, 30)];
            ll1.font=[UIFont systemFontOfSize:13.0f];
            ll1.text=@"2465742@qq.com";
            ll1.textColor=[UIColor lightGrayColor];
            [cell.contentView addSubview:ll1];
        }
        
    }
    return cell;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
